package com.mall.order.utils;

import com.common.constants.OrderConstants;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Component
@RocketMQMessageListener(topic = OrderConstants.ROCKET_ORDER_TOPIC,consumerGroup = "${rocket.consumer.group}")
public class OrderMsgConsumer implements RocketMQListener<String> {
    @Override
    public void onMessage(String s) {
        System.out.println("收到的消息:" + s);
    }
}
